/*
Copyright (C) 2006-2007 The OZI Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the disclaimer that follows 
these conditions in the documentation and/or other materials 
provided with the distribution.
3. The name "OZI" must not be used to endorse or promote products
derived from this software without prior written permission.  For
written permission, please contact The OZI Project.
4. Products derived from this software may not be called "OZI", nor
may "OZI" appear in their name, without prior written permission
from The OZI Project.
In addition, we request (but do not require) that you include in the 
end-user documentation provided with the redistribution and/or in the 
software itself an acknowledgement equivalent to the following:
"This product includes software developed by The OZI Project."
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
This software consists of voluntary contributions made by many 
individuals on behalf of The OZI Project and was originally 
created by Matt Jezorek <mjezorek@bellsouth.net>.  
 */
package com.ozi.utils;

/**
 * @version 0.1b
 * @author <a href="http://oziproject.org">OZI Project</a>
 */
public class Codes {

    public class Status {

        public static final int SUCCESS = 0;
        public static final int IMMEDIATE_SIF = 1;
        public static final int INTERMEDIATE_ACK = 2;
        public static final int FINAL_ACK = 3;
        public static final int DUPLICATE_MESSAGE_ID = 7;
        public static final int RECEIVER_SLEEPING = 8;
        public static final int NO_MESSAGE_AVAILABLE = 9;
    }

    public class Error {

        public static final int UNKNOWN = 0;
        public static final int XML_VALIDATION = 1;
        public static final int ENCRYPTION = 2;
        public static final int AUTHENTICATION = 3;
        public static final int ACCESS_AND_PERMISSIONS = 4;
        public static final int REGISTRATION = 5;
        public static final int PROVISION = 6;
        public static final int SUBSCRIPTION = 7;
        public static final int REQUEST_AND_RESPONSE = 8;
        public static final int EVENT_REPORTING_AND_PROCESSING = 9;
        public static final int TRANSPORT = 10;
        public static final int SYSTEM = 11;
        public static final int GENERIC_MESSAGE_HANDLING = 12;
    }

    public class XmlValidationError {

        public static final int GENERIC_ERROR = 1;
        public static final int MESSAGE_IS_NOT_WELL_FORMATTED = 2;
        public static final int GENERIC_VALIDATION_ERROR = 3;
        public static final int INVALID_VALUE_FOR_ELEMENT_OR_ATTRIBUTE = 4;
        public static final int RESERVED = 5;
        public static final int MISSING_MANDATORY_ELEMENT_OR_ATTRIBUTE = 6;
    }

    public class EncryptionError {

        public static final int GENERIC_ERROR = 1;
    }

    public class AuthenticationError {

        public static final int GENERIC_ERROR = 1;
        public static final int GENERIC_AUTHENTICATOIN_ERROR = 2;
        public static final int MISSING_SENDER_CERTIFICATE = 3;
        public static final int INVALID_CERTIFICATE = 4;
        public static final int SENDER_CERTIFICATE_IS_NOT_TRUSTED = 5;
        public static final int EXPIRED_CERTIFICATE = 6;
        public static final int INVALID_SIGNATURE = 7;
        public static final int INVALID_ENCRYPTION_ALGORIGTHM = 8;
        public static final int MISSING_PUBLIC_KEY_OF_THE_RECEIVER = 9;
        public static final int MISSING_RECEIVER_PRIVATE_KEY = 10;
    }

    public class AccessAndPermissionError {

        public static final int GENERIC_ERROR = 1;
        public static final int NO_PERMISSION_TO_REGISTER = 2;
        public static final int NO_PERMISSION_TO_PROVIDE_THIS_OBJECT = 3;
        public static final int NO_PERMISSION_TO_SUBSCRIBE_TO_THIS_SIF_EVENT = 4;
        public static final int NO_PERMISSION_TO_REQUEST_THIS_OBJECT = 5;
        public static final int NO_PERMISSION_TO_RESPOND_TO_THIS_OBJECT = 6;
        public static final int NO_PERMISSION_TO_REPORT_SIF_EVENT = 7;
        public static final int NO_PERMISSION_TO_ADMINISTER_POLICIES = 8;
        public static final int SIF_SOURCEID_IS_NOT_REGISTERED = 9;
        public static final int NO_PERMISSION_TO_REPORT_SIF_EVENT_ADD = 10;
        public static final int NO_PERMISSION_TO_REPORT_SIF_EVENT_CHANGE = 11;
        public static final int NO_PERMISSION_TO_REPORT_SIF_EVENT_DELETE = 12;
    }

    public class RegistrationError {

        public static final int GENERIC_ERROR = 1;
        public static final int SIF_SOURCEID_IS_INVALID = 2;
        public static final int REQUESTED_TRANSPORT_PROTOCOL_IS_UNSUPPORTED = 3;
        public static final int REQUESTED_SIF_VERSION_IS_NOT_SUPPORTED = 4;
        public static final int RESERVED = 5;
        public static final int REQUESTED_SIF_MAXBUFFERSIZE_IS_TOO_SMALL = 6;
        public static final int ZIS_REQUIRES_A_SECURE_TRANSPORT = 7;
        public static final int RESERVED_2 = 8;
        public static final int AGENT_IS_REGISTERED_FOR_PUSH_MODE = 9;
    }

    public class ProvisionErorr {

        public static final int GENERIC_ERROR = 1;
        public static final int RESERVED = 2;
        public static final int INVALID_OBJECT = 3;
        public static final int OBJECT_ALREADY_HAS_A_PROVIDER = 4;
        public static final int NOT_THE_PROVIDER_OF_THE_OBJECT = 5;
    }

    public class SubscriptionError {

        public static final int GENERIC_ERROR = 1;
        public static final int RESERVED = 2;
        public static final int INVALID_OBJECT = 3;
        public static final int NOT_A_SUBSCRIBER_OF_THE_OBJECT = 4;
    }

    public class RequestAndResponseError {

        public static final int GENERIC_ERROR = 1;
        public static final int INVALID_OBJECT = 3;
        public static final int NO_PROVIDER = 4;
        public static final int RESPONDER_DOES_NOT_SUPPORT_REQUESTED_VERSION = 7;
        public static final int RESPONDER_DOES_NOT_SUPPORT_REQUESTED_SIF_MAXBUFFERSIZE = 8;
        public static final int UNSUPPORTED_QUERY_IN_REQUEST = 9;
    }

    public class EventReportingAndProcessingError {

        public static final int GENERIC_ERROR = 1;
        public static final int INVALID_EVENT = 3;
    }

    public class TransportError {

        public static final int GENERIC_ERROR = 1;
        public static final int REQUESTED_PROTOCOL_IS_NOT_SUPPORTED = 2;
        public static final int SECURE_CHANNEL_REQUESTED_AND_NO_SECURE_PATH_EXISTS = 3;
        public static final int UNABLE_TO_STABLISH_CONNECTION = 4;
    }

    public class SystemError {

        public static final int GENERIC_ERROR = 1;
    }

    public class GenericMessageHandlingError {

        public static final int GENERIC_ERROR = 1;
        public static final int MESSAGE_NOT_SUPPORTED = 2;
        public static final int VERSION_NOT_SUPPORTED = 3;
    }
}
